import java.util.Scanner;

public class whileTest {
    public static void main(String[] args) {
        int num = (int) (Math.random() * 100 + 1);
        int count = 1;
        Scanner inputNum = new Scanner(System.in);
        int result = inputNum.nextInt();
        while (result != num) {
            if (result > num) {
                System.out.println("您猜的数字大了！！！");
            } else {
                System.out.println("您猜的数字小了！！！");
            }
            result = inputNum.nextInt();
            count++;
        }
        System.out.println("您猜对了，一共猜了" + count + "次");
        inputNum.close();
    }
}
